package cn.hznc.domain.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author：Administrator
 * @Date：2023/5/4 21:39
 */
@Getter
@Setter
@Table(name = "t_tool_inventory_location")
@TableName(value = "t_tool_inventory_location")
public class ToolInventoryLocationEntity{

    /**
     * 主键
     */
    @Column(name = "id",type = MySqlTypeConstant.INT,length = 11,isKey = true,isAutoIncrement = true)
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 工件类型表id
     */
    @Column(name = "tool_id",type = MySqlTypeConstant.INT, length = 11)
    @TableField("tool_id")
    private Integer toolId;

    /**
     * 库位id
     */
    @Column(name = "inventory_location_id",type = MySqlTypeConstant.INT, length = 11)
    @TableField("inventory_location_id")
    private Integer inventoryLocationId;

    /**
     * 总成类型表id
     */
    @Column(name = "assembly_tool_inventory_id",type = MySqlTypeConstant.INT, length = 11)
    @TableField("assembly_tool_inventory_id")
    private Integer assemblyToolInventoryId;

    /**
     * 真实库存
     */
    @Column(name = "physical_inventory",type = MySqlTypeConstant.INT , length = 11)
    @TableField("physical_inventory")
    private Integer physicalInventory;

    /**
     * 真实库存
     */
    @Column(name = "safety_inventory",type = MySqlTypeConstant.INT , length = 11)
    @TableField("safety_inventory")
    private Integer safetyInventory;


    /**
     * 最后更新时间
     */
    @Column(name = "last_update_time",type = MySqlTypeConstant.DATETIME , length = 6)
    @TableField("last_update_time")
    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date lastUpdateTime;

    /**
     * 其它参数
     */
    @Column(name = "params",type = MySqlTypeConstant.TEXT)
    @TableField("params")
    private String params;

    /**
     * 其它参数
     */
    @Column(name = "status",type = MySqlTypeConstant.TINYINT)
    @TableField("status")
    private Integer status;

    /**
     * 半径
     */
    @Column(name = "oal",type = MySqlTypeConstant.DECIMAL)
    @TableField("oal")
    private BigDecimal oal;

    /**
     * 长度
     */
    @Column(name = "length",type = MySqlTypeConstant.DECIMAL)
    @TableField("length")
    private BigDecimal length;

    /**
     * 物料编码
     */
    @TableField(exist = false)
    private String partno;


    /**
     * 刀号
     */
    @TableField(exist = false)
    private String toolNo;


    /**
     * 物料编码
     */
    @TableField(exist = false)
    private String type;

    /**
     * 物料编码
     */
    @TableField(exist = false)
    private String locationName;

    @TableField(exist = false)
    private String groupId;
}
